package com.tianqi.modules.tqs.controller;


import com.tianqi.common.api.CommonResult;
import com.tianqi.modules.tqs.service.TqCoreDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author rory
 * @since 2023-08-05
 */
@RestController
@RequestMapping("/tqs/tqCoreData")
public class TqCoreDataController {

	@Autowired
	private TqCoreDataService tqCoreDataService;

	/**
	 * 上传解析Excel
	 *
	 * @param file
	 */
	@PutMapping("/uploadExcel")
	public CommonResult<Boolean> uploadExcel(MultipartFile file) {
		return CommonResult.success(tqCoreDataService.uploadExcelData(file));
	}
}

